<?php

class AdminModel extends Model {

    protected $_logic_table = "admin";

    public function getUserInfo($username, $password) {
        $username = $this->_dao->escapeOneString($username);
        $password = $this->_dao->escapeOneString($password);
        $sql = "SELECT * FROM {$this->_table} WHERE admin_name = '$username' AND password = '$password' LIMIT 1";
        return $this->_dao->getRow($sql);
    }
}